package com.pd.modules.client.database;

public class Database
{
	private DBRoomsHandler mRooms = new DBRoomsHandler();
	private DBReservationsHandler mReservations = new DBReservationsHandler();

	// Private constructor prevents instantiation from other classes
	private Database()
	{
	}

	/**
	 * SingletonHolder is loaded on the first execution of
	 * Singleton.getInstance() or the first access to SingletonHolder.INSTANCE,
	 * not before.
	 */
	private static class SingletonHolder
	{
		public static final Database instance = new Database();
	}

	public static Database getInstance()
	{
		return SingletonHolder.instance;
	}

	public DBRoomsHandler Rooms()
	{
		return mRooms;
	}

	public DBReservationsHandler Reservations()
	{
		return mReservations;
	}

	public void clear()
	{
		mRooms.clear();
		mReservations.clear();
	}
}